An Exception was encountered at 'In [30]'.

Drawing

Real-time $R_t$ of COVID-19 pandemic in Texas (Until Sep 21)

This report estimates the county level real-time effective production number ($R_t$) of the COVID-19 pandemic in Texas, based on data from the Texas Health and Human Services. This report is updated daily with the most recent version available at the ICTR website.

This report is created and maintained by data scientists from the Institute for Clinical & Translational Research, Baylor College of Medicine, with an algorithm that is based on Kevin Systrom's work for the US data. Please refer to the original report for details.

Daily new cases and real time $R_t$ for Texas Medical Center

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/opt/conda/lib/python3.7/site-packages/pandas/core/arrays/datetimes.py in objects_to_datetime64ns(data, dayfirst, yearfirst, utc, errors, require_iso8601, allow_object)
   2053         try:
-> 2054             values, tz_parsed = conversion.datetime_to_datetime64(data)
   2055             # If tzaware, these values represent unix timestamps, so we

pandas/_libs/tslibs/conversion.pyx in pandas._libs.tslibs.conversion.datetime_to_datetime64()

TypeError: Unrecognized value type: <class 'str'>

During handling of the above exception, another exception occurred:

ParserError                               Traceback (most recent call last)
<ipython-input-26-b5ca82b63586> in <module>
      5 tmc_data = tmc_data.dropna()
      6 tmc_data = tmc_data[tmc_data["Collected Date"] != "Grand Total"]
----> 7 tmc_data['Collected Date']= pd.to_datetime(tmc_data['Collected Date'])
      8 tmc_data = tmc_data.sort_values(by='Collected Date').set_index('Collected Date')
      9 tmc_cases = tmc_data['POSITIVE'].cumsum()

/opt/conda/lib/python3.7/site-packages/pandas/core/tools/datetimes.py in to_datetime(arg, errors, dayfirst, yearfirst, utc, format, exact, unit, infer_datetime_format, origin, cache)
    801             result = arg.map(cache_array)
    802         else:
--> 803             values = convert_listlike(arg._values, format)
    804             result = arg._constructor(values, index=arg.index, name=arg.name)
    805     elif isinstance(arg, (ABCDataFrame, abc.MutableMapping)):

/opt/conda/lib/python3.7/site-packages/pandas/core/tools/datetimes.py in _convert_listlike_datetimes(arg, format, name, tz, unit, errors, infer_datetime_format, dayfirst, yearfirst, exact)
    464             errors=errors,
    465             require_iso8601=require_iso8601,
--> 466             allow_object=True,
    467         )
    468 

/opt/conda/lib/python3.7/site-packages/pandas/core/arrays/datetimes.py in objects_to_datetime64ns(data, dayfirst, yearfirst, utc, errors, require_iso8601, allow_object)
   2057             return values.view("i8"), tz_parsed
   2058         except (ValueError, TypeError):
-> 2059             raise e
   2060 
   2061     if tz_parsed is not None:

/opt/conda/lib/python3.7/site-packages/pandas/core/arrays/datetimes.py in objects_to_datetime64ns(data, dayfirst, yearfirst, utc, errors, require_iso8601, allow_object)
   2048             dayfirst=dayfirst,
   2049             yearfirst=yearfirst,
-> 2050             require_iso8601=require_iso8601,
   2051         )
   2052     except ValueError as e:

pandas/_libs/tslib.pyx in pandas._libs.tslib.array_to_datetime()

pandas/_libs/tslib.pyx in pandas._libs.tslib.array_to_datetime()

pandas/_libs/tslib.pyx in pandas._libs.tslib.array_to_datetime_object()

pandas/_libs/tslib.pyx in pandas._libs.tslib.array_to_datetime_object()

pandas/_libs/tslibs/parsing.pyx in pandas._libs.tslibs.parsing.parse_datetime_string()

/opt/conda/lib/python3.7/site-packages/dateutil/parser/_parser.py in parse(timestr, parserinfo, **kwargs)
   1372         return parser(parserinfo).parse(timestr, **kwargs)
   1373     else:
-> 1374         return DEFAULTPARSER.parse(timestr, **kwargs)
   1375 
   1376 

/opt/conda/lib/python3.7/site-packages/dateutil/parser/_parser.py in parse(self, timestr, default, ignoretz, tzinfos, **kwargs)
    647 
    648         if res is None:
--> 649             raise ParserError("Unknown string format: %s", timestr)
    650 
    651         if len(res) == 0:

ParserError: Unknown string format: Grand Total:
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-28-94df48a8a569> in <module>
      1 fig, axes = plt.subplots(nrows=1, ncols=2, figsize=(15, 5))
      2 
----> 3 tmc_original, tmc_smoothed = prepare_cases(tmc_cases, cutoff=14, smooth_days=param_days, smooth_std=param_std)
      4 plot_tmc_cases(tmc_cases, axes[0], smooth_days=param_days, smooth_std=param_std)
      5 

NameError: name 'tmc_cases' is not defined

Here are estimated $R_t$ in the past 15 days:

Execution using papermill encountered an exception here and stopped:

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-29-cc80061d9bfa> in <module>
----> 1 tmc_result.tail(n=15)

NameError: name 'tmc_result' is not defined

Daily new cases and real time $R_t$ for Harris County

NOTE: New cases reported on September 16 (2768) includes cases in the past month that were not reported in time. The estimated real-time $R_t$ for September 16 is therefore inaccurate.

Here are estimated $R_t$ in the past 15 days:

ML Low_90 High_90 Low_50 High_50
county date
Harris 2020-09-07 0.65 0.44 0.80 0.54 0.69
2020-09-08 0.59 0.40 0.76 0.50 0.65
2020-09-09 0.68 0.48 0.85 0.60 0.75
2020-09-10 0.80 0.61 0.98 0.69 0.85
2020-09-11 0.99 0.79 1.16 0.87 1.03
2020-09-12 1.21 1.00 1.37 1.12 1.27
2020-09-13 1.48 1.28 1.64 1.38 1.53
2020-09-14 1.56 1.38 1.72 1.48 1.62
2020-09-15 1.58 1.39 1.72 1.48 1.62
2020-09-16 1.43 1.25 1.57 1.35 1.48
2020-09-17 1.24 1.05 1.37 1.15 1.28
2020-09-18 0.96 0.78 1.10 0.88 1.01
2020-09-19 0.77 0.60 0.92 0.66 0.80
2020-09-20 0.59 0.42 0.75 0.49 0.63
2020-09-21 0.65 0.47 0.81 0.57 0.71

Daily new cases and real time $R_t$ for all Texas counties

Most recent $R_t$ by county